<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/pages/templates/TemplateClient.xhtml">

	<ui:define name="titre">Comme au resto</ui:define>
	<ui:define name="content">
		<h:head>
	    Mon compte client
	    <br/>
	<br/> <br/>
</h:head>
		<h:body>
		
	<h:messages/><h:form> 
 	<br/>
 	<table>
 	<f:event listener="#{clientMB.doChargeClient}" type="preRenderView"></f:event>
 	
	<tr><td>Nom : </td><td><h:inputText value ="#{clientMB.client.nom}" required="true" requiredMessage="Nom manquant" /> </td></tr>
	<tr><td>Prénom : </td><td><h:inputText value ="#{clientMB.client.prenom}" /></td></tr>
	<tr/><tr/>
	<tr><td>Numéro : </td><td><h:inputText value ="#{clientMB.numeroRue}"/></td><td> Voie :</td><td><h:inputText value ="#{clientMB.rue.nomRue}" required="true" requiredMessage="Voie manquante"/></td></tr>
	<tr><td>Ville : </td><td><h:inputText value ="#{clientMB.ville.nomVille}"  required="true" requiredMessage="Ville manquante"/></td></tr>
	<tr><td>CP : </td><td><h:inputText value ="#{clientMB.codePostal}" required="true" requiredMessage="Code postal manquant">
	</h:inputText></td></tr>
	</table>
	<br/><br/>
	Mes points fidélités : <h:outputText value ="#{clientMB.client.pointsFidelite}" /> 
	<br/><br/>
	<h:commandButton value="Sauvegarder"  action="#{clientMB.doMaj}"/>
	 <br/> <br/>
	</h:form> 
	</h:body>
</ui:define>
</ui:composition>
